
package com.jiuqi.ccp.generator.form;

import java.text.ParseException;
import java.text.SimpleDateFormat;

import javax.servlet.http.HttpServletRequest;

import org.apache.struts.action.ActionError;
import org.apache.struts.action.ActionErrors;
import org.apache.struts.action.ActionForm;
import org.apache.struts.action.ActionMapping;

/**
 * Form for ccpSoScheme.
 *
 * @author <a href="http://boss.bekk.no/boss/middlegen/"/>Middlegen</a>
 *
 * @struts.form name="ccpSoSchemeForm"
 */
public class CcpSoSchemeForm extends ActionForm {

   private final static SimpleDateFormat FORMAT = new SimpleDateFormat("dd.MM.yyyy hh:mm:ss");

   private java.lang.String _schGuid = null;
   private java.lang.String _schNo = null;
   private java.lang.String _name = null;
   private java.lang.String _url = null;
   private java.lang.String _descript = null;
   private java.lang.String _schType = null;
   private java.lang.String _reserved1 = null;
   private java.lang.String _reserved2 = null;
   private java.lang.String _reserved3 = null;

   /**
    * Standard constructor.
    */
   public CcpSoSchemeForm() {
   }

   /**
    * Returns the schGuid
    *
    * @return the schGuid
    */
   public java.lang.String getSchGuid() {
      return _schGuid;
   }

   /**
    * Sets the schGuid
    *
    * @param schGuid the new schGuid value
    */
   public void setSchGuid(java.lang.String schGuid) {
      _schGuid = schGuid;
   }
   /**
    * Returns the schNo
    *
    * @return the schNo
    */
   public java.lang.String getSchNo() {
      return _schNo;
   }

   /**
    * Sets the schNo
    *
    * @param schNo the new schNo value
    */
   public void setSchNo(java.lang.String schNo) {
      _schNo = schNo;
   }
   /**
    * Returns the name
    *
    * @return the name
    */
   public java.lang.String getName() {
      return _name;
   }

   /**
    * Sets the name
    *
    * @param name the new name value
    */
   public void setName(java.lang.String name) {
      _name = name;
   }
   /**
    * Returns the url
    *
    * @return the url
    */
   public java.lang.String getUrl() {
      return _url;
   }

   /**
    * Sets the url
    *
    * @param url the new url value
    */
   public void setUrl(java.lang.String url) {
      _url = url;
   }
   /**
    * Returns the descript
    *
    * @return the descript
    */
   public java.lang.String getDescript() {
      return _descript;
   }

   /**
    * Sets the descript
    *
    * @param descript the new descript value
    */
   public void setDescript(java.lang.String descript) {
      _descript = descript;
   }
   /**
    * Returns the schType
    *
    * @return the schType
    */
   public java.lang.String getSchType() {
      return _schType;
   }

   /**
    * Sets the schType
    *
    * @param schType the new schType value
    */
   public void setSchType(java.lang.String schType) {
      _schType = schType;
   }
   /**
    * Returns the reserved1
    *
    * @return the reserved1
    */
   public java.lang.String getReserved1() {
      return _reserved1;
   }

   /**
    * Sets the reserved1
    *
    * @param reserved1 the new reserved1 value
    */
   public void setReserved1(java.lang.String reserved1) {
      _reserved1 = reserved1;
   }
   /**
    * Returns the reserved2
    *
    * @return the reserved2
    */
   public java.lang.String getReserved2() {
      return _reserved2;
   }

   /**
    * Sets the reserved2
    *
    * @param reserved2 the new reserved2 value
    */
   public void setReserved2(java.lang.String reserved2) {
      _reserved2 = reserved2;
   }
   /**
    * Returns the reserved3
    *
    * @return the reserved3
    */
   public java.lang.String getReserved3() {
      return _reserved3;
   }

   /**
    * Sets the reserved3
    *
    * @param reserved3 the new reserved3 value
    */
   public void setReserved3(java.lang.String reserved3) {
      _reserved3 = reserved3;
   }


   /**
    * Validate the properties that have been set from this HTTP request,
    * and return an <code>ActionErrors</code> object that encapsulates any
    * validation errors that have been found.  If no errors are found, return
    * <code>null</code> or an <code>ActionErrors</code> object with no
    * recorded error messages.
    *
    * @param mapping The mapping used to select this instance
    * @param request The servlet request we are processing
    */
   public ActionErrors validate(ActionMapping mapping, HttpServletRequest request) {
      ActionErrors errors = new ActionErrors();
      // test for nullity
      if(getSchGuid() == null) {
         errors.add("schGuid", new ActionError("error.schGuid.required"));
      }
      // TODO test format/data
      return errors;
   }
}
